GetControlDataSize
NEW WITH THE APPEARANCE MANAGER
Returns the size (in bytes) of a control's tagged data.
pascal OSErr GetControlDataSize ( ControlHandle inControl, ControlPartCode inPart, ResType inTagName, Size *outMaxSize);
inControl
- On input, a handle to the specified control.
inPart
- The part code of the control part whose control-specific data you wish to set; see "Control Part Code Constants". Passing
kControlEntireControl
indicates that either the control has no parts or the data is not tied to any specific part of the control.inTagName
- A constant representing the control-specific data you wish to get; see "Control Data Tag Constants".
outMaxSize
- On output, a pointer to the size of the control's tagged data. This value should be passed to
SetControlData
andGetControlData
to allocate a sufficiently large buffer for variable-length data.- function result
- A result code; see "Result Codes". The result code
errDataNotSupported
indicates that theinTagName
parameter is not valid.DISCUSSION
Pass the value returned in theoutMaxSize
parameter ofGetControlDataSize
in theinBufferSize
parameter ofSetControlData
andGetControlData
to allocate an adequate buffer for variable-length data.SEE ALSO
"Appearance Manager Gestalt Selector Constants".